package com.nsl.my_youlai.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.nsl.my_youlai.model.bo.UserBO;
import com.nsl.my_youlai.model.bo.UserFormBO;
import com.nsl.my_youlai.model.dto.UserAuthInfo;
import com.nsl.my_youlai.model.entity.SysUser;
import com.nsl.my_youlai.model.query.UserPageQuery;
import com.nsl.my_youlai.model.vo.UserExportVO;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 用户持久层
 *
 * @author haoxr
 * @since 2022/1/14
 */
//@Mapper
@Repository
public interface SysUserMapper extends BaseMapper<SysUser> {

    UserAuthInfo getUserAuthInfo(String username);

//    @DataPermission(deptAlias = "u")
    //todo: 应该是数据权限的注解
    Page<UserBO> getUserPage(Page<UserBO> page, UserPageQuery queryParams);

    UserFormBO getUserDetail(Long userId);

    List<UserExportVO> listExportUsers(UserPageQuery queryParams);
}
